﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Noea.TogSim.Model.Train.LocoDriver.States
{
    public class StoppedState : LocoState
    {
        public StoppedState()
            : base()
        {
            base._description = "Stopped";
        }
        public override LocoState Handle(LocoDriver_StPattern ld)
        {
            if (ld.Train.ActualSpeed <= 0.2)
            {
                ld.Train.ActualSpeed = 0;
                return this;
            }
            else
            {
                return StateFactory.StoppingState;
            }
        }
    }
}
